home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / gdiff-2.2 / configure < prev    next >
Encoding:
Text File  |  1995-05-03  |  16.2 KB  |  636 lines

  1. #!/bin/sh
  2. # Guess values for system-dependent variables and create Makefiles.
  3. # Generated automatically using autoconf.
  4. # Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
  5.  
  6. # This program is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2, or (at your option)
  9. # any later version.
  10.  
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. # GNU General Public License for more details.
  15.  
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20. # Usage: configure [--srcdir=DIR] [--host=HOST] [--gas] [--nfp] [--no-create]
  21. #        [--prefix=PREFIX] [--exec-prefix=PREFIX] [--with-PACKAGE] [TARGET]
  22. # Ignores all args except --srcdir, --prefix, --exec-prefix, --no-create, and
  23. # --with-PACKAGE unless this script has special code to handle it.
  24.  
  25.  
  26. for arg
  27. do
  28.   # Handle --exec-prefix with a space before the argument.
  29.   if test x$next_exec_prefix = xyes; then exec_prefix=$arg; next_exec_prefix=
  30.   # Handle --host with a space before the argument.
  31.   elif test x$next_host = xyes; then next_host=
  32.   # Handle --prefix with a space before the argument.
  33.   elif test x$next_prefix = xyes; then prefix=$arg; next_prefix=
  34.   # Handle --srcdir with a space before the argument.
  35.   elif test x$next_srcdir = xyes; then srcdir=$arg; next_srcdir=
  36.   else
  37.     case $arg in
  38.      # For backward compatibility, also recognize exact --exec_prefix.
  39.      -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*)
  40.     exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  41.      -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
  42.     next_exec_prefix=yes ;;
  43.  
  44.      -gas | --gas | --ga | --g) ;;
  45.  
  46.      -host=* | --host=* | --hos=* | --ho=* | --h=*) ;;
  47.      -host | --host | --hos | --ho | --h)
  48.     next_host=yes ;;
  49.  
  50.      -nfp | --nfp | --nf) ;;
  51.  
  52.      -no-create | --no-create | --no-creat | --no-crea | --no-cre | --no-cr | --no-c | --no- | --no)
  53.         no_create=1 ;;
  54.  
  55.      -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  56.     prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  57.      -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  58.     next_prefix=yes ;;
  59.  
  60.      -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
  61.     srcdir=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  62.      -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
  63.     next_srcdir=yes ;;
  64.  
  65.      -with-* | --with-*)
  66.        package=`echo $arg|sed 's/-*with-//'`
  67.        # Delete all the valid chars; see if any are left.
  68.        if test -n "`echo $package|sed 's/[-a-zA-Z0-9_]*//g'`"; then
  69.          echo "configure: $package: invalid package name" >&2; exit 1
  70.        fi
  71.        eval "with_`echo $package|sed s/-/_/g`=1" ;;
  72.  
  73.      *) ;;
  74.     esac
  75.   fi
  76. done
  77.  
  78. trap 'rm -f conftest* core; exit 1' 1 3 15
  79.  
  80. rm -f conftest*
  81. compile='${CC-cc} $CFLAGS $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1'
  82.  
  83. # A filename unique to this package, relative to the directory that
  84. # configure is in, which we can look for to find out if srcdir is correct.
  85. unique_file=diff.h
  86.  
  87. # Find the source files, if location was not specified.
  88. if test -z "$srcdir"; then
  89.   srcdirdefaulted=yes
  90.   # Try the directory containing this script, then `..'.
  91.   prog=$0
  92.   confdir=`echo $prog|sed 's%/[^/][^/]*$%%'`
  93.   test "X$confdir" = "X$prog" && confdir=.
  94.   srcdir=$confdir
  95.   if test ! -r $srcdir/$unique_file; then
  96.     srcdir=..
  97.   fi
  98. fi
  99. if test ! -r $srcdir/$unique_file; then
  100.   if test x$srcdirdefaulted = xyes; then
  101.     echo "configure: Can not find sources in \`${confdir}' or \`..'." 1>&2
  102.   else
  103.     echo "configure: Can not find sources in \`${srcdir}'." 1>&2
  104.   fi
  105.   exit 1
  106. fi
  107. # Preserve a srcdir of `.' to avoid automounter screwups with pwd.
  108. # But we can't avoid them for `..', to make subdirectories work.
  109. case $srcdir in
  110.   .|/*|~*) ;;
  111.   *) srcdir=`cd $srcdir; pwd` ;; # Make relative path absolute.
  112. esac
  113.  
  114. if test -z "$CC"; then
  115.   echo checking for gcc
  116.   saveifs="$IFS"; IFS="${IFS}:"
  117.   for dir in $PATH; do
  118.     test -z "$dir" && dir=.
  119.     if test -f $dir/gcc; then
  120.       CC="gcc"
  121.       break
  122.     fi
  123.   done
  124.   IFS="$saveifs"
  125. fi
  126. test -z "$CC" && CC="cc"
  127.  
  128. # Find out if we are using GNU C, under whatever name.
  129. cat > conftest.c <<EOF
  130. #ifdef __GNUC__
  131.   yes
  132. #endif
  133. EOF
  134. ${CC-cc} -E conftest.c > conftest.out 2>&1
  135. if egrep yes conftest.out >/dev/null 2>&1; then
  136.   GCC=1 # For later tests.
  137. fi
  138. rm -f conftest*
  139.  
  140. echo checking how to run the C preprocessor
  141. if test -z "$CPP"; then
  142.   CPP='${CC-cc} -E'
  143.   cat > conftest.c <<EOF
  144. #include <stdio.h>
  145. EOF
  146. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  147. if test -z "$err"; then
  148.   :
  149. else
  150.   CPP=/lib/cpp
  151. fi
  152. rm -f conftest*
  153. fi
  154.  
  155. # Make sure to not get the incompatible SysV /etc/install and
  156. # /usr/sbin/install, which might be in PATH before a BSD-like install,
  157. # or the SunOS /usr/etc/install directory, or the AIX /bin/install,
  158. # or the AFS install, which mishandles nonexistent args.  (Sigh.)
  159. if test -z "$INSTALL"; then
  160.   echo checking for install
  161.   saveifs="$IFS"; IFS="${IFS}:"
  162.   for dir in $PATH; do
  163.     test -z "$dir" && dir=.
  164.     case $dir in
  165.     /etc|/usr/sbin|/usr/etc|/usr/afsws/bin) ;;
  166.     *)
  167.       if test -f $dir/install; then
  168.     if grep dspmsg $dir/install >/dev/null 2>&1; then
  169.       : # AIX
  170.     else
  171.       INSTALL="$dir/install -c"
  172.       INSTALL_PROGRAM='$(INSTALL)'
  173.       INSTALL_DATA='$(INSTALL) -m 644'
  174.       break
  175.     fi
  176.       fi
  177.       ;;
  178.     esac
  179.   done
  180.   IFS="$saveifs"
  181. fi
  182. INSTALL=${INSTALL-cp}
  183. INSTALL_PROGRAM=${INSTALL_PROGRAM-'$(INSTALL)'}
  184. INSTALL_DATA=${INSTALL_DATA-'$(INSTALL)'}
  185.  
  186. echo checking for minix/config.h
  187. cat > conftest.c <<EOF
  188. #include <minix/config.h>
  189. EOF
  190. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  191. if test -z "$err"; then
  192.   MINIX=1
  193. fi
  194. rm -f conftest*
  195.  
  196. # The Minix shell can't assign to the same variable on the same line!
  197. if test -n "$MINIX"; then
  198.   DEFS="$DEFS -D_POSIX_SOURCE=1"
  199.   DEFS="$DEFS -D_POSIX_1_SOURCE=2"
  200.   DEFS="$DEFS -D_MINIX=1"
  201. fi
  202.  
  203. echo checking for POSIXized ISC
  204. if test -d /etc/conf/kconfig.d &&
  205.   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  206. then
  207.   ISC=1 # If later tests want to check for ISC.
  208.   DEFS="$DEFS -D_POSIX_SOURCE=1"
  209.   if test -n "$GCC"; then
  210.     CC="$CC -posix"
  211.   else
  212.     CC="$CC -Xp"
  213.   fi
  214. fi
  215.  
  216. echo checking for directory library header
  217. echo checking for dirent.h
  218. cat > conftest.c <<EOF
  219. #include <dirent.h>
  220. EOF
  221. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  222. if test -z "$err"; then
  223.   DEFS="$DEFS -DDIRENT=1" dirheader=dirent.h
  224. fi
  225. rm -f conftest*
  226.  
  227. if test -z "$dirheader"; then
  228. echo checking for sys/ndir.h
  229. cat > conftest.c <<EOF
  230. #include <sys/ndir.h>
  231. EOF
  232. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  233. if test -z "$err"; then
  234.   DEFS="$DEFS -DSYSNDIR=1" dirheader=sys/ndir.h
  235. fi
  236. rm -f conftest*
  237.  
  238. fi
  239. if test -z "$dirheader"; then
  240. echo checking for sys/dir.h
  241. cat > conftest.c <<EOF
  242. #include <sys/dir.h>
  243. EOF
  244. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  245. if test -z "$err"; then
  246.   DEFS="$DEFS -DSYSDIR=1" dirheader=sys/dir.h
  247. fi
  248. rm -f conftest*
  249.  
  250. fi
  251. if test -z "$dirheader"; then
  252. echo checking for ndir.h
  253. cat > conftest.c <<EOF
  254. #include <ndir.h>
  255. EOF
  256. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  257. if test -z "$err"; then
  258.   DEFS="$DEFS -DNDIR=1" dirheader=ndir.h
  259. fi
  260. rm -f conftest*
  261.  
  262. fi
  263.  
  264. echo checking for closedir return value
  265. cat > conftest.c <<EOF
  266. #include <sys/types.h>
  267. #include <$dirheader>
  268. int closedir(); main() { exit(0); }
  269. EOF
  270. eval $compile
  271. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  272.   :
  273. else
  274.   DEFS="$DEFS -DVOID_CLOSEDIR=1"
  275. fi
  276. rm -f conftest*
  277.  
  278. prog='/* Ultrix mips cc rejects this.  */
  279. typedef int charset[2]; const charset x;
  280. /* SunOS 4.1.1 cc rejects this. */
  281. char const *const *p;
  282. char **p2;
  283. /* HPUX 7.0 cc rejects these. */
  284. ++p;
  285. p2 = (char const* const*) p;'
  286. echo checking for working const
  287. cat > conftest.c <<EOF
  288.  
  289. main() { exit(0); } 
  290. t() { $prog }
  291. EOF
  292. if eval $compile; then
  293.   :
  294. else
  295.   DEFS="$DEFS -Dconst="
  296. fi
  297. rm -f conftest*
  298.  
  299. echo checking for ANSI C header files
  300. cat > conftest.c <<EOF
  301. #include <stdlib.h>
  302. #include <stdarg.h>
  303. #include <string.h>
  304. #include <float.h>
  305. EOF
  306. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  307. if test -z "$err"; then
  308.   # SunOS string.h does not declare mem*, contrary to ANSI.
  309. echo '#include <string.h>' > conftest.c
  310. eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
  311. if egrep "memchr" conftest.out >/dev/null 2>&1; then
  312.   # SGI's /bin/cc from Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  313. cat > conftest.c <<EOF
  314. #include <ctype.h>
  315. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  316. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  317. #define XOR(e,f) (((e) && !(f)) || (!(e) && (f)))
  318. int main () { int i; for (i = 0; i < 256; i++)
  319. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  320. exit (0); }
  321.  
  322. EOF
  323. eval $compile
  324. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  325.   DEFS="$DEFS -DSTDC_HEADERS=1"
  326. fi
  327. rm -f conftest*
  328. fi
  329. rm -f conftest*
  330.  
  331. fi
  332. rm -f conftest*
  333.  
  334. echo checking for unistd.h
  335. cat > conftest.c <<EOF
  336. #include <unistd.h>
  337. EOF
  338. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  339. if test -z "$err"; then
  340.   DEFS="$DEFS -DHAVE_UNISTD_H=1"
  341. fi
  342. rm -f conftest*
  343.  
  344. echo checking for pid_t in sys/types.h
  345. echo '#include <sys/types.h>' > conftest.c
  346. eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
  347. if egrep "pid_t" conftest.out >/dev/null 2>&1; then
  348.   :
  349. else 
  350.   DEFS="$DEFS -Dpid_t=int"
  351. fi
  352. rm -f conftest*
  353.  
  354. for func in dup2 memchr strerror waitpid
  355. do
  356. trfunc=HAVE_`echo $func | tr '[a-z]' '[A-Z]'`
  357. echo checking for ${func}
  358. cat > conftest.c <<EOF
  359. #include <stdio.h>
  360. main() { exit(0); } 
  361. t() { 
  362. #ifdef __stub_${func}
  363. choke me
  364. #else
  365. /* Override any gcc2 internal prototype to avoid an error.  */
  366. extern char ${func}(); ${func}();
  367. #endif
  368.  }
  369. EOF
  370. if eval $compile; then
  371.   DEFS="$DEFS -D${trfunc}=1"
  372. fi
  373. rm -f conftest*
  374. #endif
  375. done
  376.  
  377. for hdr in fcntl.h string.h sys/wait.h time.h
  378. do
  379. trhdr=HAVE_`echo $hdr | tr '[a-z]./' '[A-Z]__'`
  380. echo checking for ${hdr}
  381. cat > conftest.c <<EOF
  382. #include <${hdr}>
  383. EOF
  384. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  385. if test -z "$err"; then
  386.   DEFS="$DEFS -D${trhdr}=1"
  387. fi
  388. rm -f conftest*
  389. done
  390.  
  391. echo checking for vfork.h
  392. cat > conftest.c <<EOF
  393. #include <vfork.h>
  394. EOF
  395. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  396. if test -z "$err"; then
  397.   DEFS="$DEFS -DHAVE_VFORK_H=1"
  398. fi
  399. rm -f conftest*
  400.  
  401. echo checking for working vfork
  402. cat > conftest.c <<EOF
  403. /* Thanks to Paul Eggert for this test.  */
  404. #include <stdio.h>
  405. #include <sys/types.h>
  406. #include <sys/stat.h>
  407. #ifdef HAVE_UNISTD_H
  408. #include <unistd.h>
  409. #endif
  410. #ifdef HAVE_VFORK_H
  411. #include <vfork.h>
  412. #endif
  413. main() {
  414.   pid_t parent = getpid();
  415.   pid_t child = vfork();
  416.  
  417.   if (child == 0) {
  418.     /* On sparc systems, changes by the child to local and incoming
  419.        argument registers are propagated back to the parent.
  420.        The compiler is told about this with #include <vfork.h>,
  421.        but some compilers (e.g. gcc -O) don't grok <vfork.h>.
  422.        Test for this by using lots of local variables, at least
  423.        as many local variables as main has allocated so far
  424.        including compiler temporaries.  4 locals are enough for
  425.        gcc 1.40.3 on a sparc, but we use 8 to be safe.
  426.        A buggy compiler should reuse the register of parent
  427.        for one of the local variables, since it will think that
  428.        parent can't possibly be used any more in this routine.
  429.        Assigning to the local variable will thus munge parent
  430.        in the parent process.  */
  431.     pid_t
  432.       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
  433.       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
  434.     /* Convince the compiler that p..p7 are live; otherwise, it might
  435.        use the same hardware register for all 8 local variables.  */
  436.     if (p != p1 || p != p2 || p != p3 || p != p4
  437.     || p != p5 || p != p6 || p != p7)
  438.       _exit(1);
  439.  
  440.     /* On some systems (e.g. IRIX 3.3),
  441.        vfork doesn't separate parent from child file descriptors.
  442.        If the child closes a descriptor before it execs or exits,
  443.        this munges the parent's descriptor as well.
  444.        Test for this by closing stdout in the child.  */
  445.     _exit(close(fileno(stdout)) != 0);
  446.   } else {
  447.     int status;
  448.     struct stat st;
  449.  
  450.     while (wait(&status) != child)
  451.       ;
  452.     exit(
  453.      /* Was there some problem with vforking?  */
  454.      child < 0
  455.  
  456.      /* Did the child fail?  (This shouldn't happen.)  */
  457.      || status
  458.  
  459.      /* Did the vfork/compiler bug occur?  */
  460.      || parent != getpid()
  461.  
  462.      /* Did the file descriptor bug occur?  */
  463.      || fstat(fileno(stdout), &st) != 0
  464.      );
  465.   }
  466. }
  467. EOF
  468. eval $compile
  469. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  470.   :
  471. else
  472.   DEFS="$DEFS -Dvfork=fork"
  473. fi
  474. rm -f conftest*
  475.  
  476. # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  477. # for constant arguments.  Useless!
  478. echo checking for working alloca.h
  479. cat > conftest.c <<EOF
  480. #include <alloca.h>
  481. main() { exit(0); } 
  482. t() { char *p = alloca(2 * sizeof(int)); }
  483. EOF
  484. if eval $compile; then
  485.   DEFS="$DEFS -DHAVE_ALLOCA_H=1"
  486. fi
  487. rm -f conftest*
  488.  
  489. decl="#ifdef __GNUC__
  490. #define alloca __builtin_alloca
  491. #else
  492. #if HAVE_ALLOCA_H
  493. #include <alloca.h>
  494. #else
  495. #ifdef _AIX
  496.  #pragma alloca
  497. #else
  498. char *alloca ();
  499. #endif
  500. #endif
  501. #endif
  502. "
  503. echo checking for alloca
  504. cat > conftest.c <<EOF
  505. $decl
  506. main() { exit(0); } 
  507. t() { char *p = (char *) alloca(1); }
  508. EOF
  509. if eval $compile; then
  510.   :
  511. else
  512.   alloca_missing=1
  513. fi
  514. rm -f conftest*
  515.  
  516. if test -n "$alloca_missing"; then
  517.   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  518.   # that cause trouble.  Some versions do not even contain alloca or
  519.   # contain a buggy version.  If you still want to use their alloca,
  520.   # use ar to extract alloca.o from them instead of compiling alloca.c.
  521.   ALLOCA=alloca.o
  522. fi
  523.  
  524. echo checking for st_blksize in struct stat
  525. cat > conftest.c <<EOF
  526. #include <sys/types.h>
  527. #include <sys/stat.h>
  528. main() { exit(0); } 
  529. t() { struct stat s; s.st_blksize; }
  530. EOF
  531. if eval $compile; then
  532.   DEFS="$DEFS -DHAVE_ST_BLKSIZE=1"
  533. fi
  534. rm -f conftest*
  535.  
  536. echo checking for Xenix
  537. cat > conftest.c <<EOF
  538. #if defined(M_XENIX) && !defined(M_UNIX)
  539.   yes
  540. #endif
  541.  
  542. EOF
  543. eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
  544. if egrep "yes" conftest.out >/dev/null 2>&1; then
  545.   XENIX=1
  546. fi
  547. rm -f conftest*
  548.  
  549. if test -n "$XENIX"; then
  550.   DEFS="$DEFS -DVOID_CLOSEDIR=1"
  551.   LIBS="$LIBS -lx"
  552.   case "$DEFS" in
  553.   *SYSNDIR*) ;;
  554.   *) LIBS="-ldir $LIBS" ;; # Make sure -ldir precedes any -lx.
  555.   esac
  556. fi
  557.  
  558. if test -n "$prefix"; then
  559.   test -z "$exec_prefix" && exec_prefix='${prefix}'
  560.   prsub="s%^prefix\\([     ]*\\)=\\([     ]*\\).*$%prefix\\1=\\2$prefix%"
  561. fi
  562. if test -n "$exec_prefix"; then
  563.   prsub="$prsub
  564. s%^exec_prefix\\([     ]*\\)=\\([     ]*\\).*$%\
  565. exec_prefix\\1=\\2$exec_prefix%"
  566. fi
  567.  
  568. trap 'rm -f config.status; exit 1' 1 3 15
  569. echo creating config.status
  570. rm -f config.status
  571. cat > config.status <<EOF
  572. #!/bin/sh
  573. # Generated automatically by configure.
  574. # Run this file to recreate the current configuration.
  575. # This directory was configured as follows,
  576. # on host `(hostname || uname -n) 2>/dev/null`:
  577. #
  578. # $0 $*
  579.  
  580. for arg
  581. do
  582.   case "\$arg" in
  583.     -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  584.     exec /bin/sh $0 $* ;;
  585.     *) echo "Usage: config.status --recheck" 2>&1; exit 1 ;;
  586.   esac
  587. done
  588.  
  589. trap 'rm -f Makefile; exit 1' 1 3 15
  590. CC='$CC'
  591. CPP='$CPP'
  592. INSTALL='$INSTALL'
  593. INSTALL_PROGRAM='$INSTALL_PROGRAM'
  594. INSTALL_DATA='$INSTALL_DATA'
  595. ALLOCA='$ALLOCA'
  596. LIBS='$LIBS'
  597. srcdir='$srcdir'
  598. DEFS='$DEFS'
  599. prefix='$prefix'
  600. exec_prefix='$exec_prefix'
  601. prsub='$prsub'
  602. EOF
  603. cat >> config.status <<\EOF
  604.  
  605. top_srcdir=$srcdir
  606. for file in .. Makefile; do if [ "x$file" != "x.." ]; then
  607.   srcdir=$top_srcdir
  608.   # Remove last slash and all that follows it.  Not all systems have dirname.
  609.   dir=`echo $file|sed 's%/[^/][^/]*$%%'`
  610.   if test "$dir" != "$file"; then
  611.     test "$top_srcdir" != . && srcdir=$top_srcdir/$dir
  612.     test ! -d $dir && mkdir $dir
  613.   fi
  614.   echo creating $file
  615.   rm -f $file
  616.   echo "# Generated automatically from `echo $file|sed 's|.*/||'`.in by configure." > $file
  617.   sed -e "
  618. $prsub
  619. s%@CC@%$CC%g
  620. s%@CPP@%$CPP%g
  621. s%@INSTALL@%$INSTALL%g
  622. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  623. s%@INSTALL_DATA@%$INSTALL_DATA%g
  624. s%@ALLOCA@%$ALLOCA%g
  625. s%@LIBS@%$LIBS%g
  626. s%@srcdir@%$srcdir%g
  627. s%@DEFS@%$DEFS%
  628. " $top_srcdir/${file}.in >> $file
  629. fi; done
  630.  
  631. exit 0
  632. EOF
  633. chmod +x config.status
  634. test -n "$no_create" || ./config.status
  635.  
  636.